package com.spring.config;

import com.spring.bean.Car;
import com.spring.bean.Cat;
import com.spring.bean.Dog;
import com.spring.bean.MyBeanPostProcess;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Scope;

/**
 * Description:
 *
 * @author lijie
 * @create 2019-01-15 23:56
 * Update by lijie 2019-01-15 23:56
 */
@Configuration
@Import({MyBeanPostProcess.class})
public class MainConfigOfLifeCycle {
    @Bean(initMethod = "init",destroyMethod = "destory")
    public Car car(){
        return new Car();
    }


    @Bean
    //@Scope("prototype")
    public Cat cat(){
        return new Cat();
    }
    @Bean
    //@Scope("prototype")
    public Dog dog(){
        return new Dog();
    }
}
